package main.java.demo;

import main.java.aircraft.Airbus380;
import main.java.aircraft.Boeing747;
import main.java.aircraft.LearJet45;
import main.java.controlMediator.RegionalAirTrafficControlConcreteMediator;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
	public static final void main(String[] args){
		
		ApplicationContext cntx =  
	             new ClassPathXmlApplicationContext("context.xml");
		
		Airbus380 aircraft1 = (Airbus380) cntx.getBean("airbus");
		aircraft1.setAltitude(1150);
		
		Boeing747 aircraft2 = (Boeing747) cntx.getBean("boeing");
		aircraft2.setAltitude(4350);
		
		LearJet45 aircraft3 = (LearJet45) cntx.getBean("laserJet");
		aircraft3.setAltitude(1550);
		
	}
}
